package com.fjxd.planeTicket.util;

import com.fjxd.feign.result.ViewResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author csw
 */
@RestControllerAdvice
public class ProjectExceptionAdvice {
    @ExceptionHandler(Exception.class)
    public ViewResult doOtherException(Exception ex) {
        ex.printStackTrace();
        return new ViewResult(ViewResult.Status.SERVERERROR.getCode(), ViewResult.Status.SERVERERROR.getMessage());
    }
}
